// ex5_6.cpp -- total of 12 months volumes, 2-D array.
#include <iostream>
const int MonSize = 12;
const int ArSize = 3;

int main(void)
{
	using std::cout;
	using std::cin;
	using std::endl;

	char *months[MonSize] = 
	{
		"January", "February", "March", "April", "May",
		"June", "July", "August", "September", "October",
		"November", "December"
	};
    
	int volumes[ArSize][MonSize] = {0};
    int sum1 = 0;
	int cnt = 0;
	int cnt2 = 0;
	cout << "Enter the 12 months volumes: \n";

	while (cnt2 < ArSize)
	{
		cout << "\nInput " << cnt2 + 1 << " year information:\n";
		while (cnt < MonSize)
		{
			cout << months[cnt] << " volume is: ";
			cin >> volumes[cnt2][cnt];
			sum1 += volumes[cnt2][cnt];
			cnt++;
		}
		cnt = 0;
		cnt2++;
	}
    
	cout << "\n\nInformationi of 12 months volumes: \n";
	for (int i = 0; i < ArSize; i++)
    {
		cout << "\nthe " << i + 1 << " year volume is :\n";
		for (int j = 0; j < MonSize; j++)
		{
			cout << months[j] << " volumes is "
			     << volumes[i][j] << endl;
		}
	}

	cout << "Total of volume of 12 months is " 
		 << sum1 << endl;
}

